var Mock = require('mockjs');
// 配置mock
Mock.setup({
    timeout: "300-600", // 延迟 300 毫秒 到 600毫秒返回数据
});
const menu = {
    "data": [
        {
            "id": 7,
            "authName": "系统首页",
            "path": "home",
            "meta": {
                "requireAuth": true,  // 添加该字段，表示进入这个路由是需要登录的
            },
            "children": [{
                "id": 101,
                "authName": "主页",
                "path": "home",
                "meta": {
                    "requireAuth": true,  // 添加该字段，表示进入这个路由是需要登录的
                },
                "children": [],
                "order": 1
                }
            ]
        },
        {
        "id": 1,
        "authName": "用户管理",
        "path": "users",
        "meta": {
            "requireAuth": true,  // 添加该字段，表示进入这个路由是需要登录的
        },
        "children": [{
            "id": 101,
            "authName": "用户列表",
            "path": "userlist",
            "children": [],
            "order": 1
            },
            {
                "id": 102,
                "authName": "用户详情",
                "path": "userinfo",
                "children": [],
                "order": 1
            },
            {
                "id": 103,
                "authName": "调班",
                "path": "tiaoban",
                "children": [],
                "order": 1
            }],
        "order": 1
        }, 
        {
            "id": 2,
            "authName": "权限管理",
            "path": "rights",
            "children": [{
                "id": 201,
                "authName": "角色列表",
                "path": "roles",
                "children": [],
                "order": 2
            },
            {
                "id": 202,
                "authName": "权限列表",
                "path": "rightslist",
                "children": [],
                "order": 2
            },
            {
                "id": 203,
                "authName": "编辑",
                "path": "rightsedit",
                "children": [],
                "order": 2
            }],
            "order": 2
        }, 
        {
            "id": 3,
            "authName": "教师管理",
            "path": "teachers",
            "children": [{
                "id": 301,
                "authName": "教师列表",
                "path": "teacherlist",
                "children": [],
                "order": 3
            },
            {
                "id": 302,
                "authName": "新增教师",
                "path": "createteacher",
                "children": [],
                "order": 3
            },
            {
                "id": 303,
                "authName": "教师简介",
                "path": "teacherinfo",
                "children": [],
                "order": 3
            }],
            "order": 3
        }, 
        {
            "id": 4,
            "authName": "订单管理",
            "path": "orders",
            "children": [{
                "id": 401,
                "authName": "订单列表",
                "path": "orderlist",
                "children": [],
                "order": 4
            },
            {
                "id": 402,
                "authName": "订单详情",
                "path": "orderinfo",
                "children": [],
                "order": 4
            }],
            "order": 4
        }, 
        {
            "id": 5,
            "authName": "课程管理",
            "path": "courses",
            "children": [{
                "id": 501,
                "authName": "课程列表",
                "path": "courselist",
                "children": [],
                "order": 5
            },
            {
                "id": 502,
                "authName": "新增课程",
                "path": "createcourse",
                "children": [],
                "order": 5
            },
            {
                "id": 503,
                "authName": "课程详情",
                "path": "courseinfo",
                "children": [],
                "order": 5
            },],
            "order": 5
        },
        {
            "id": 6,
            "authName": "官网管理",
            "path": "officalweb",
            "children": [
                {
                    "id": 601,
                    "authName": "轮播图列表",
                    "path": "bannerlist",
                    "children": [],
                    "order": 6
                },
                {
                    "id": 602,
                    "authName": "新增轮播图",
                    "path": "addbanner",
                    "children": [],
                    "order": 6
                },
                {
                    "id": 603,
                    "authName": "编辑轮播图",
                    "path": "editbanner",
                    "children": [],
                    "order": 6
                },
            ]
        }
    ],
    "meta": {
        "msg": "获取菜单列表成功",
        "status": 200
    }
}
export const getMenuHandler = (options) => {
    console.log(options,'获取导航列表')
    return menu
}
Mock.mock("/menu", "get", getMenuHandler)